package cn.mst.vrs.controller.app.user;

import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.stp.StpUtil;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.mst.vrs.controller.app.user.vo.VrsUserPrivateRespVO;
import cn.mst.vrs.service.user.UserService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@Tag(name = "WX - 预约用户API")
@RestController
@RequestMapping("/vrs/user")
public class VrsUserAppController {
    @Resource
    private UserService userService;

    @SaCheckLogin
    @GetMapping("/private")
    @Operation(summary = "私域 - 用户信息获取")
    public CommonResult<VrsUserPrivateRespVO> privateInfo() {
        return CommonResult.success(userService.getPrivateInfo(StpUtil.getLoginIdAsLong()));
    }
}
